home *** CD-ROM | disk | FTP | other *** search
/ Backpacker 2 (Sweden) / BackPacker 2 (Sweden) (Disc 1).7z / BackPacker 2 (Sweden) (Disc 1).bin / pc / instdata / inst0024 / 00046.ls < prev    next >
Encoding:
Text File  |  1997-01-01  |  733 b   |  25 lines

  1. on ExportSavedGame nr
  2.   global gRsrcPath
  3.   set F to FileIO(mnew, "READ", FixPath(gRsrcPath & "BP2SAVED\INDEX.IIF"))
  4.   if objectp(F) then
  5.     set IndexText to F(mReadFile)
  6.     F(mdispose)
  7.     set SGL to value(line 2 of IndexText)
  8.     set fileName to getAt(SGL, nr) & ".BPD"
  9.     set F to FileIO(mnew, "READ", FixPath(gRsrcPath & "BP2SAVED\" & fileName))
  10.     if objectp(F) then
  11.       set savedgametxt to F(mReadFile)
  12.       F(mdispose)
  13.       set expotxt to savedgametxt
  14.       set F to FileIO(mnew, "?WRITE", "BP2GAME.TXT")
  15.       if objectp(F) then
  16.         set err to F(mWriteString, expotxt)
  17.         F(mdispose)
  18.         if err then
  19.           alert(line 1 of field "MenuErrorMessages")
  20.         end if
  21.       end if
  22.     end if
  23.   end if
  24. end
  25.